//
//  NextView.m
//  YinYueBoFang_Forever
//
//  Created by lanou3g on 15/11/5.
//  Copyright © 2015年 lanou3g. All rights reserved.
//

#import "NextView.h"

@implementation NextView

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self p_setUpViews];
    }
    return self;
}

-(void)p_setUpViews
{
    
    self.v1 = [[UIView alloc] init];
    self.v1.backgroundColor = [UIColor cyanColor];
    self.v1.frame = CGRectMake(0, 0, 375, 90);
    [self addSubview:self.v1];
    
    
    self.songNameLable = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.frame)/2.0-30, 30, 150, 20)];
    self.songNameLable.text = @"歌曲名字";
    [self.v1 addSubview:self.songNameLable];
    
    self.singerLable = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.frame)/2.0-30, 60, 150, 20)];
    self.singerLable.text = @"歌手名字";
    [self.v1 addSubview:self.singerLable];
    
    
    self.scView = [[UIScrollView alloc] init];
    
//    self.scView.backgroundColor = [UIColor redColor];
    self.scView.frame = CGRectMake(0, 90, 375, 300);
    self.scView.contentSize = CGSizeMake(375*2, 300);
    self.scView.pagingEnabled = YES;
    
    
    self.v2 = [[UIImageView alloc] init];
    //    self.v2.backgroundColor = [UIColor yellowColor];
    self.v2.frame = CGRectMake(70, 40, 240, 240);
    self.v2.layer.masksToBounds = YES;
    self.v2.layer.cornerRadius = 120;
    [self.scView addSubview:self.v2];
    [self addSubview:self.scView];
    
    
    self.v3 = [[UIView alloc]init];
    self.v3.backgroundColor = [UIColor whiteColor];
    self.v3.frame = CGRectMake(375, 0, 375, 300);
    [self.scView addSubview:self.v3];
    
    
    
    
    self.tab = [[UITableView alloc] init];
    self.tab.frame = CGRectMake(375, 0, 375, 300);
    [self.scView addSubview:self.tab];
    
    
    self.lastButton =[UIButton buttonWithType:UIButtonTypeSystem];
    //    self.lastButton.backgroundColor = [UIColor yellowColor];
    self.lastButton.frame =CGRectMake(50, 450, 80, 50);
    [self.lastButton setTitle:@"上一首" forState:(UIControlStateNormal)];
    [self addSubview:self.lastButton];
    
    
    self.controButton =[UIButton buttonWithType:UIButtonTypeSystem];
    //    self.controButton.backgroundColor = [UIColor yellowColor];
    self.controButton.frame =CGRectMake(150, 450, 80, 50);
    [self.controButton setTitle:@"暂停" forState:(UIControlStateNormal)];
    [self addSubview:self.controButton];
    
    self.nextButton =[UIButton buttonWithType:UIButtonTypeSystem];
    //    self.nextButton.backgroundColor = [UIColor yellowColor];
    self.nextButton.frame =CGRectMake(250, 450, 80, 50);
    [self.nextButton setTitle:@"下一首" forState:(UIControlStateNormal)];
    [self addSubview:self.nextButton];
    
    
    
    self.slider = [[UISlider alloc] init];
    self.slider.frame = CGRectMake(10, 420, 350, 50);
    [self addSubview:self.slider];
    
    
    self.danqu = [UIButton buttonWithType:(UIButtonTypeSystem)];
    self.danqu.frame = CGRectMake(50, 500, 80, 50);
    [self.danqu setTitle:@"单曲循环" forState:(UIControlStateNormal)];
    [self.danqu setTag:10000];
    [self addSubview:self.danqu];
    
    
    self.suiji = [UIButton buttonWithType:(UIButtonTypeSystem)];
    self.suiji.frame = CGRectMake(150, 500, 80, 50);
    [self.suiji setTitle:@"随机播放" forState:(UIControlStateNormal)];
    [self.suiji setTag:10001];
    [self addSubview:self.suiji];
    
    
    self.xunhuan = [UIButton buttonWithType:(UIButtonTypeSystem)];
    self.xunhuan.frame = CGRectMake(250, 500, 80, 50);
    [self.xunhuan setTitle:@"循环播放" forState:(UIControlStateNormal)];
    [self.xunhuan setTag:10002];
    [self addSubview:self.xunhuan];
    
    
    self.backButton = [UIButton buttonWithType:(UIButtonTypeSystem)];
    //    self.backButton.backgroundColor = [UIColor yellowColor];
    self.backButton.frame = CGRectMake(315, 30, 50, 40);
    [self.backButton setTitle:@"返回" forState:(UIControlStateNormal)];
    
    [self.v1 addSubview:self.backButton];
    
    
    
    
    
    
}


@end

